// @ts-ignore
/* eslint-disable */
import request from '@/services/request';

/** 列表查询 GET /v1/evaluation-composes */
export async function evaluationComposeV1ControllerIndex(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.EvaluationComposeV1ControllerIndexParams,
  options?: { [key: string]: any },
) {
  return request<{ total: number; list: API.EvaluationComposeIndexResult[] }>(
    '/v1/evaluation-composes',
    {
      method: 'GET',
      params: {
        // pageSize has a default value: 20
        pageSize: '20',

        ...params,
      },
      ...(options || {}),
    },
  );
}

/** 新增 POST /v1/evaluation-composes */
export async function evaluationComposeV1ControllerCreate(
  body: API.EvaluationComposeCreateDto,
  options?: { [key: string]: any },
) {
  return request<any>('/v1/evaluation-composes', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 详情 GET /v1/evaluation-composes/${param0} */
export async function evaluationComposeV1ControllerShow(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.EvaluationComposeV1ControllerShowParams,
  options?: { [key: string]: any },
) {
  const { uuid: param0, ...queryParams } = params;
  return request<API.EvaluationComposeShowResult>(`/v1/evaluation-composes/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 删除 DELETE /v1/evaluation-composes/${param0} */
export async function evaluationComposeV1ControllerDestroy(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.EvaluationComposeV1ControllerDestroyParams,
  options?: { [key: string]: any },
) {
  const { uuid: param0, ...queryParams } = params;
  return request<any>(`/v1/evaluation-composes/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 修改 PATCH /v1/evaluation-composes/${param0} */
export async function evaluationComposeV1ControllerUpdate(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.EvaluationComposeV1ControllerUpdateParams,
  body: API.EvaluationComposeUpdateDto,
  options?: { [key: string]: any },
) {
  const { uuid: param0, ...queryParams } = params;
  return request<any>(`/v1/evaluation-composes/${param0}`, {
    method: 'PATCH',
    headers: {
      'Content-Type': 'application/json',
    },
    params: { ...queryParams },
    data: body,
    ...(options || {}),
  });
}
